public abstract class Car2 {
    private String name;
    private genderCarType type;
    public static int count=0;
    private double fees;

    public Car2(String name, genderCarType type, double fees) {
        this.name = name;
        this.type = type;
        this.fees = fees;
        count++;
    }
    public int getCount(){
        return count;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public genderCarType getType() {
        return type;
    }

    public void setType(genderCarType type) {
        this.type = type;
    }

    public static void setCount(int count) {
        Car2.count = count;
    }

    public double getFees() {
        return fees;
    }

    public void setFees(double fees) {
        this.fees = fees;
    }
    public abstract void carFunction();

    @Override
    public String toString() {
        return "Car2{" +
                "name='" + name + '\'' +
                ", type=" + type +
                ", fees=" + fees +
                '}';
    }
}
